<!DOCTYPE html>
<html>
<head>
<title>RGBCubeLabTest</title>
<script type="text/javascript" src="libs/three.min.js"></script>
<script type="text/javascript" src="libs/dat.gui.min.js"></script>

<script type="text/javascript" src="RGBCubeLab.js"></script>

<script type="text/javascript">

var loaded = false;

function init()
{
	if(loaded)
		return;

	loaded = true;
		
	console.log("loaded");
	myLab = new CODECO.RGBCubeLab("container", {animating : 10});
	
	function gameLoop() {
		//update
		myLab.update();
		
		//render
		requestAnimationFrame(gameLoop);
		myLab.render();
	}
	window.addEventListener("mousemove", CODECO.AppState.mouseMove, false);
	window.addEventListener("mousedown", CODECO.AppState.mousePress, false);
	window.addEventListener("mouseup", CODECO.AppState.mouseRelease, false);
	gameLoop();
}

window.addEventListener("load", init, false);

</script>



</head>
<body>
<h1>Testo</h1>

<div id="container"></div>
<div>ChangeTest</div>
</body>
</html>